//
//  ATVInstanceObjectProperty.m
//  FlashController
//
//  Created by Martin Schiøth Dyrby on 8/6/12.
//  Copyright 2012 Molamil. All rights reserved.
//

#import "ATVInstanceObjectProperty.h"
#import "ATVObjectPropertyViewController.h"

@implementation ATVInstanceObjectProperty


@synthesize name;
@synthesize type;
@synthesize path;
@synthesize viewController;
@synthesize isMethod;


- (id)init
{
    self = [super init];
    if (self) {
        // Initialization code here.
    }
    
    return self;
}

- (NSView *) initView {
    viewController = [[ATVObjectPropertyViewController alloc] initWithNibName:@"ATVObjectPropertyViewController" bundle:nil];
    [viewController setPath: path];
    return viewController.view;
}

- (void) drawView {
    [viewController drawFromModel:self];
}

- (NSComparisonResult) compare: (id<ATVInstanceProperty>) item {
    return [[item name] compare:name];
}

@end
